import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View
} from 'react-native';

const styles = StyleSheet.create({
    root: {
        flex: 1
    }
});
import EditPanel from '../components/editPanel';
import Login from '../components/login';
import DefaultInfo from '../data/defaultInfo';
import { observer } from 'mobx-react/native';
@observer
export default class PostArticle extends Component {
    constructor (props) {
        super(props);
        this.state = {
            login: DefaultInfo.user
        }
    }
    render() {
        if (DefaultInfo.user) {
            return (
                <View style={styles.root}>
                    <EditPanel userInfo={DefaultInfo.user} />
                </View>
            );
        } else{
            return (
                <View style={styles.root}>
                    <Login />
                </View>
            );
        }
    }
}
